You are welcome to contribute to development, feel free to create a fork on GitHub!
New Features in v2.0: - Password input dialog now included (no more dependency on external tools like kdesudo) - Easier management of service definition files (incl. one-click update) - Hide unavailable services - Environment variables aren't needed any more ($INITDIR will be guessed, $SUDO has become superfluous) - Ability to copy existing services as custom services - Sudo configuration helper (creates snippets for inclusion in /etc/sudoers) - Three different indicator icon themes - Option to suppress stdout of start/stop commands - Report external state changes through KNotify - Service icons can be placed directly in the panel (without popup)
Thank you for this great plasmoid i have been using it for a while and it has been a great experience!
It whould be great if we could use the plasmoid for remote services too (via ssh???) or wake a remote system (WOL).
Tnx again, keep up the good work!
One of my favorite plasmoids, but since a Python-KDE4 upgrade on SuSE 11.4/KDE 4.8.5 this morning, V2RC2 barfs up with a "RuntimeError: the sip module implements API v9.0 but the PyKDE4.plasma module requires API v8.1" error. Before this upgrade also crashed my plasma desktop with unversioned something errors.
This is really a great app! But I don't get a pop up, when I put it in the panel (it just shows the upmost icon and description of the list). What could be the reason for this? I would really appreciate to use it, if this could be solved...
Hi
wollte das script verwenden aber leider funzt es nicht. Habe opensuse 12 und beim starten kommmt die Fehlermeldeung dass es ein Python script brauht. Weist du zufällig welches Paket ich zusätzlich installieren muß ?
danke wäre super denn das Script könnte ich gut brauchen
lg
chris
Unter Debian muss "plasma-scriptengine-python" installiert sein, bei suse müsste es dasselbe oder was ähnliches geben. Falls es das nicht war, welche Fehlermeldung bekommst du?
also als Fehlermeldung kommt bei mir: "Der python-skript Treiber für Service Monitor kann nicht installiert werden"
Jetzt weis ich nicht in welchem Packet der drinnen ist
kannst du mir da weiterhelfen ?
Puh, das wird vermutlich schon die Plasma Scriptengine für Python sein. Aber ich weiß nicht, was für ein Paket man da unter SuSE installieren muss. Hast du mal geschaut, ob es ein Paket "plasma-scriptengine-python" gibt?
You should change mysqld job detection: it fails on kde because akonadi uses mysqld for its embedded db. I added a new service for akonadi mysqld job and a new check for running jobs.
<service id="mysql-daemon for kde env" priority="0">
<name>MySQL Database</name>
<description>Database server used by many programs (stopping could be a bad idea)</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>ps fax|grep mysqld|grep "akonadi"|cut -d"?" -f1|grep -v grep</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>
<service id="mysql-daemon" priority="0">
<name>MySQL Database</name>
<description>Database server used by many programs (stopping could be a bad idea)</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>ps fax|grep mysqld|grep -v "akonadi"|cut -d"?" -f1|grep -v grep</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>
Humm I was wrong..you are expecting an exit code from the check...I fixed it adding a custom shell script for mysql process (put it in your path):
#!/bin/sh
SERVICE=$1
if [ "$SERVICE" = "akonadi" ]
then
if ps fax | grep -v grep | grep "mysqld" | grep $SERVICE > /dev/null
then
echo "$SERVICE service running, bye bye"
exit 0
else
echo "$SERVICE is not running"
exit 1
fi
else
if ps fax | grep -v grep | grep "mysqld" | grep -v "akonadi" > /dev/null
then
echo "Mysqld service running, bye bye"
exit 0
else
echo "$SERVICE is not running"
exit 1
fi
fi
And daemons-common.xml:
<service id="mysql-daemon for kde env" priority="0">
<name>MySQL Database for KDE Env</name>
<description>Database server used by kde (stopping could be a bad idea)</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>pidofmysql.sh akonadi</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>
<service id="mysql-daemon" priority="0">
<name>MySQL Database</name>
<description>Database server</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>pidofmysql.sh mysql</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>
Thank you for the suggestions!
Actually, it seems you were thinking a bit too complicated. The following commands seem to work fine:
show non-akonadi process:
ps ax | grep "/usr/sbin/mysqld" | grep -v grep| grep -v akonadi
show akonadi process:
ps ax | grep "/usr/sbin/mysqld" | grep -v grep| grep akonadi
Can you check if they work correctly? Then I'll include them into the official sources.
Hi,
humm...I think it fails because you are going to expect a return code from the test....that's why i used a custom shell script to check mysql instances.
The return code is irrelevant if the commands are syntactically correct and produce no errors. So for the check to succeed it must only produce non-empty output.
May be I am wrong..but you are using "proc.exitCode()" and your original check calls pidof which returns an exit code. Running ps returns everytime 0. That's why your check fails...from pidof man:
EXIT STATUS
0 At least one program was found with the requested name.
1 No program was found with the requested name.
That may be right, but pidof also produces no output if the given process cannot be found.
For a check to fail, it is sufficient to return non-zero exit code OR zero output.
For a check to succeed, it must return exit code zero AND non-empty output.
Besides, on second thought it makes little to define a service for the akonadi MySQL process, because there is no shutdown possibility other than killing the server or akonadi itself. For akonadi there is already a service defined, and killing the MySQL process right under Akonadi's nose seems a bad idea to me.
Occasionally I want to turn the screen off while leaving the laptop/desktop running in the background. This example service makes it a single button click:
DPMS
Turn the screen off/on
Install check:
which xset
Running check:
xset q | grep "DPMS is Enabled"
Start command:
xset dpms force on
Stop command:
xset dpms force off
Ratings & Comments
72 Comments
The 2.0 link downloads 1.1.3.x Please advise.
It's not working on KDE 4.10 :( it crash plasma.
Thank you for this great plasmoid i have been using it for a while and it has been a great experience! It whould be great if we could use the plasmoid for remote services too (via ssh???) or wake a remote system (WOL). Tnx again, keep up the good work!
One of my favorite plasmoids, but since a Python-KDE4 upgrade on SuSE 11.4/KDE 4.8.5 this morning, V2RC2 barfs up with a "RuntimeError: the sip module implements API v9.0 but the PyKDE4.plasma module requires API v8.1" error. Before this upgrade also crashed my plasma desktop with unversioned something errors.
Are you still having this issue? Can you give some more precise information?
The problem went away this morning when I installed an updated Python Bindings for KDE4-package from the SuSE KDE 4.8 builds repository.
Glad to hear this. I once had a similar problem with delayed upgrades for python bindings. Was really annoying...
This is probably the most useful plasma utility I've come across so far! Keep up the good work!
This is really a great app! But I don't get a pop up, when I put it in the panel (it just shows the upmost icon and description of the list). What could be the reason for this? I would really appreciate to use it, if this could be solved...
solved...
Sorry for the late answer, I haven't been at home. What was the cause?
Hi wollte das script verwenden aber leider funzt es nicht. Habe opensuse 12 und beim starten kommmt die Fehlermeldeung dass es ein Python script brauht. Weist du zufällig welches Paket ich zusätzlich installieren muß ? danke wäre super denn das Script könnte ich gut brauchen lg chris
Unter Debian muss "plasma-scriptengine-python" installiert sein, bei suse müsste es dasselbe oder was ähnliches geben. Falls es das nicht war, welche Fehlermeldung bekommst du?
also als Fehlermeldung kommt bei mir: "Der python-skript Treiber für Service Monitor kann nicht installiert werden" Jetzt weis ich nicht in welchem Packet der drinnen ist kannst du mir da weiterhelfen ?
Puh, das wird vermutlich schon die Plasma Scriptengine für Python sein. Aber ich weiß nicht, was für ein Paket man da unter SuSE installieren muss. Hast du mal geschaut, ob es ein Paket "plasma-scriptengine-python" gibt?
This is one of the most polished well designed plasmoids I've seen. You should try and get it into KDE extragear.
You should change mysqld job detection: it fails on kde because akonadi uses mysqld for its embedded db. I added a new service for akonadi mysqld job and a new check for running jobs.
Humm I was wrong..you are expecting an exit code from the check...I fixed it adding a custom shell script for mysql process (put it in your path): And daemons-common.xml:
Thank you for the suggestions! Actually, it seems you were thinking a bit too complicated. The following commands seem to work fine: show non-akonadi process: ps ax | grep "/usr/sbin/mysqld" | grep -v grep| grep -v akonadi show akonadi process: ps ax | grep "/usr/sbin/mysqld" | grep -v grep| grep akonadi Can you check if they work correctly? Then I'll include them into the official sources.
Hi, humm...I think it fails because you are going to expect a return code from the test....that's why i used a custom shell script to check mysql instances.
The return code is irrelevant if the commands are syntactically correct and produce no errors. So for the check to succeed it must only produce non-empty output.
May be I am wrong..but you are using "proc.exitCode()" and your original check calls pidof which returns an exit code. Running ps returns everytime 0. That's why your check fails...from pidof man: EXIT STATUS 0 At least one program was found with the requested name. 1 No program was found with the requested name.
That may be right, but pidof also produces no output if the given process cannot be found. For a check to fail, it is sufficient to return non-zero exit code OR zero output. For a check to succeed, it must return exit code zero AND non-empty output. Besides, on second thought it makes little to define a service for the akonadi MySQL process, because there is no shutdown possibility other than killing the server or akonadi itself. For akonadi there is already a service defined, and killing the MySQL process right under Akonadi's nose seems a bad idea to me.
Occasionally I want to turn the screen off while leaving the laptop/desktop running in the background. This example service makes it a single button click: DPMS Turn the screen off/on Install check: which xset Running check: xset q | grep "DPMS is Enabled" Start command: xset dpms force on Stop command: xset dpms force off
Thank you very much. I have included the definitions in the tools & settings file.